#pragma once

#include <linux/preempt.h>

void irq_enter_rcu(void);
void irq_exit_rcu(void);

/*
 * Like __irq_enter() without time accounting for fast
 * interrupts, e.g. reschedule IPI where time accounting
 * is more expensive than the actual interrupt.
 */
#define __irq_enter_raw()          \
    do                             \
    {                              \
        __preempt_count_add(2, 1); \
    } while (0)

/*
 * Like __irq_exit() without time accounting
 */
#define __irq_exit_raw()            \
    do                              \
    {                               \
        __preempt_count_add(2, -1); \
    } while (0)
